Fix: check for None instead of false value in sort_ref_id (current li… #6
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…ne raises exception if electrode 0 is set to reference)
Description
Please include a summary of the changes and the related issue. Please also
include relevant motivation and context. Please list issues fixed or closed by
This PR.
`/home/sc4712/src/spyglass/src/spyglass/spikesorting/utils.py': Currently li 79 of function get_group_by_shank reads 'if not sort_ref_id', which results in raising an exception if trying to set reference electrode to the 0th electrode.
Alter notes:
if references:
sort_ref_id = references.get(e_group, None)
if sort_ref_id is None: ##### this line was changed to not result in raising an exception if sort_ref_id is set to 0 (the 0th electrode)
raise Exception(
f"electrode group {e_group} not a key in "
+ "references, so cannot set reference"
)
Checklist:
CITATION.cffaltersnippet for release notes.CHANGELOG.mdwith PR number and description.